<?php
date_default_timezone_set('PRC');
include_once 'defined.php';
include_once BP.'config.local.php';
ini_set('session.cookie_domain', DN);
//include_once BP.'config.live.php';//for live
include_once BP.'lib/Soul/Config.php';
include_once BP.'lib/Soul/Classes/Autoload.php';

Soul_Config::$debug = DEBUG;
Soul_Config::addStaticScope('Soul');
Soul_Config::addDynamicScope('Core');
Soul_Config::addIncludePath(BP.'lib'.DS, DP_CODE);
Soul_Classes_Autoload::register();

Soul_Config::$dbTablePrefix = $dbSettings['tablePrefix'];
foreach ($dbSettings['connections'] as $connectionSetting) {
	Soul_Config::addConnectionString(
		$connectionSetting['name'],
		$connectionSetting['driver'],
		$connectionSetting['server'],
		$connectionSetting['database'],
		$connectionSetting['username'],
		$connectionSetting['password'],
		$connectionSetting['default']
	);
} 